<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ include file="/mb/jsp/common.jsp" %>
<%@ page import="com.wsu.search.tools.Tools" %>
<%
    //取得url带过来的参数
    String studyid = Tools.RmNull(request.getParameter("studyid"));
    String m = Tools.RmNull(request.getParameter("m"));

%>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>公告详情</title>
</head>
<body ontouchstart="">
 
</footer>
<script type="text/javascript" src="mb/js/Base64.js"></script>
<script>

//加载新数据
    function getData() {
        $.ajax({
            url: "LoginServlet",
            data: JSON.stringify({m:<%=m%>,studyid:<%=studyid%>}),
            type: 'post',
            dataType: 'json',
            contentType: "application/json;charset=utf-8",
            beforeSend: function () {
                showProgressDg();
            },
            success: function (data) {
               if (data.state == 1) {
                  showData(data.obj);
                } else {
                    // 其他错误弹出提示
                    showToast(data.info);
                }
            },
            error: function (data) {
                showToast(data.info);
            },
            complete: function () {
                closeProgressDg();
            }
        });
    }
    


      function showData(obj){
      	//base64解码
     	 var b = new Base64();
     	 var studycontent = b.decode(obj.studycontent);    	 
     	 document.write(studycontent);
    } 
    
    
    $(document).ready(function(){
    
		getData();
	});
</script>
</body>
</html>
